
package combat.dudes.client.gui.threads.map.mini;

import javax.swing.JPanel;

import combat.dudes.DudesFunctions;
import combat.dudes.client.gui.images.Painter;
import combat.dudes.client.gui.threads.map.ClientGUIMap;
import combat.dudes.client.gui.threads.map.ClientGUIMap.MapType;
import combat.dudes.client.gui.threads.shell.GUIShell;


/**
 * @author Laurens Andriessen
 * @version 1.0
 */
public class GUIMiniMap {

	private final static JPanel myPanel = GUIShell.windowMiniMap.myBodyPanel;
	public final static int mapWidth = myPanel.getWidth();
	public final static int mapHeight = myPanel.getHeight();

	public GUIMiniMap() {

		myPanel.add(new ClientGUIMap(MapType.MINI, myPanel.getWidth(), myPanel.getHeight()));

		int i = 0;
		while(true) {
			i++;

			long start = DudesFunctions.DateTime.getTimeInMs();

			myPanel.setBounds(0, 0, mapWidth + (i % 2), mapHeight + (i % 2));

			Painter.repaint(myPanel);

			DudesFunctions.Status.DelayUpdate(start, 200, Thread.currentThread());

		}

	}
}
